-
Notifications
You must be signed in to change notification settings - Fork 13.9k
std: move check for destroyed TLS variable #148037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
std: move check for destroyed TLS variable
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (db38fd3): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -0.6%, secondary -2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.7%, secondary 2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 474.995s -> 473.568s (-0.30%) |
When accessing a TLS variable, the comparison that checks whether the variable is initialised can be inlined to the call site. The comparison that checks whether the variable has been destroyed is however performed in the
#[cold]accessor function. Since all call-sites need to check whether the returned pointer is null, this split prevents these two checks from being merged into one. Thus moving the liveliness check into the inlineable accessor may yield more optimal codegen. This is especially true in the case where the variable does not need destruction and thus no null pointer will ever be returned, as the null-pointer check can now be optimised out.